package SimpleFactory;

/**
 * @author: HenryDai
 * @Date: 2022/05/02 14:36
 * @description:
 */
public class Factory {

    public Phone makePhone(String phoneType)
    {
        if(phoneType.equals("huawei"))
        {
            return new HuaweiPhone();
        }
        else if(phoneType.equals("apple"))
        {
            return new ApplePhone();
        }
        return null;
    }

}
